#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H

#include <QDialog>

namespace Ui { class SettingsDialog; }
class AbstractSettingsForm;
class QModelIndex;

class SettingsDialog : public QDialog
{
    Q_OBJECT
public:
    explicit SettingsDialog (QWidget *parent = 0);
    ~SettingsDialog();

public slots:
    void initialize();
    void changeSettingsPage (const QModelIndex &index);
    void saveChildrenSettings();
    void setCurrentView (int category, int tab);

private:
    void setupForms();
    void setupCategoryView();
    void setupAppearance();
    void setupConnections();
    void loadSettings();

    Ui::SettingsDialog *ui;
    QList<AbstractSettingsForm*> m_settingForms;
    int m_showCategoryRequested;
    int m_showTabRequested;

private slots:
    void saveSettings();

signals:
    void notifyHint (const QString& title, const QString& message);
    void notifyInformation (const QString& title, const QString& message);
    void notifyWarning (const QString& title, const QString& message);
};

#endif // SETTINGSDIALOG_H
